//
//  UIColor+Extension.swift
//  weibo
//
//  Created by Fly on 2017/12/15.
//  Copyright © 2017年 Fly. All rights reserved.
//

import Foundation
import UIKit

extension UIColor {
    
    /// 随机色
    open class var randomColor: UIColor {
        
//        let red = CGFloat(arc4random()%256)/255.0
//        let green = CGFloat(arc4random()%256)/255.0
//        let blue = CGFloat(arc4random()%256)/255.0
        
        let r = getRandomNum(fromNum: 142, toNum: 255)
        let g = getRandomNum(fromNum: 154, toNum: 255)
        let b = getRandomNum(fromNum: 151, toNum: 255)
        
        let red = CGFloat(r)/255.0
        let green = CGFloat(g)/255.0
        let blue = CGFloat(b)/255.0
        return UIColor(red: red, green: green, blue: blue, alpha: 1.0)
    
    }

}
